//浏览器打开时执行的函数
window.onload=function(){
	Weather_Time();
}

//根据当前日期变换时间图片
var NowDate = new Date();
var WeekDay = new Array("sunday","monday","tuesday","wendesday","thursday","friday","saturday");
var Month   = new Array("month1","month2","month3","month4","month5","month6","month7","month8","month9","month10","month11","month12");
var DateTime= new Array("0","1","2","3","4","5","6","7","8","9");
var Cur_Time= new Array("earlymoning","morning","lunchtime","afternoon","evening","nighttime")

function Weather_Time(){
	//星期
	document.getElementById("Week").src="img/WeekDay/"+WeekDay[NowDate.getDay()]+".png";
	//月份
	document.getElementById("Month").src="img/Month/"+Month[NowDate.getMonth()]+".png";
	//日期
	document.getElementById("Date1").src="img/Date/"+DateTime[parseInt(NowDate.getDate()/10)]+".png";
	document.getElementById("Date2").src="img/Date/"+DateTime[NowDate.getDate()%10]+".png";
	//时间
	var time = NowDate.getHours();
	if(time>=3&&time<=6){
		document.getElementById("Time").src="img/Time/"+Cur_Time[0]+".png";
	}else if(time<=11){
		document.getElementById("Time").src="img/Time/"+Cur_Time[1]+".png";
	}else if(time<=14){
		document.getElementById("Time").src="img/Time/"+Cur_Time[2]+".png";
	}else if(time<=18){
		document.getElementById("Time").src="img/Time/"+Cur_Time[3]+".png";
	}else if(time<=22){
		document.getElementById("Time").src="img/Time/"+Cur_Time[4]+".png";
	}else{
		document.getElementById("Time").src="img/Time/"+Cur_Time[5]+".png";
	}
}


